package io.noties.markwon.plugin.uml.model

import org.json.JSONException

import org.json.JSONObject


class UmlRelation(
    var relationOriginClass: UmlClass, //to this
    var relationEndClass: UmlClass, umlRelationType: UmlRelationType
) {
    enum class UmlRelationType {
        INHERITANCE, REALIZATION, AGGREGATION, COMPOSITION, ASSOCIATION, DEPENDENCY
    }

    var xOrigin: Float
    var yOrigin: Float
    var xEnd: Float
    var yEnd: Float
    var umlRelationType: UmlRelationType

    //    **********************************************************************************************
    //    Constructors
    //    **********************************************************************************************
    init {
        relationEndClass = relationEndClass
        this.umlRelationType = umlRelationType
        xOrigin = 0f
        yOrigin = 0f
        xEnd = 0f
        yEnd = 0f
    }

    companion object {
        const val JSON_RELATION_TYPE = "RelationType"
        const val JSON_RELATION_ORIGIN_CLASS = "RelationOriginClass"
        const val JSON_RELATION_END_CLASS = "RelationEndCLass"

    }
}
